import {
  Column,
  Entity,
  JoinColumn,
  OneToOne,
  PrimaryGeneratedColumn,
} from 'typeorm';
import { User } from './user.entity';
@Entity()
export class Profile {
  constructor(
    id: number,
    gender: number,
    photo: string,
    address: string,
    user?: User,
  ) {
    this.id = id;
    this.gender = gender;
    this.photo = photo;
    this.address = address;
    this.user = user || null;
  }
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  gender: number;

  @Column()
  photo: string;

  @Column()
  address: string;

  @OneToOne(() => User)
  @JoinColumn()
  user: User | null;
}
